//
//  TrendLineView.m
//  NormalFramework
//
//  Created by beisheng03 on 2018/3/17.
//  Copyright © 2018年 beisheng. All rights reserved.
//

#import "TrendLineView.h"

@implementation TrendLineView


- (void)drawRect:(CGRect)rect {
    
    //创建路径
    UIBezierPath *path = [UIBezierPath bezierPath];
        //移动到起始点
    
    [path moveToPoint:CGPointMake(20, 200)];
    
    //添加路径
    [path addLineToPoint:CGPointMake(110, 100)];
    
    [path addLineToPoint:CGPointMake(210, 90)];

    
    [path addLineToPoint:CGPointMake(310, 40)];

    
    [path addLineToPoint:CGPointMake(410, 72)];

    
    //设置路径的属性值
    
    [[UIColor redColor] set];
    
    [path setLineWidth:3];
    
    //渲染到View上显示
    
    [path stroke];
  
}


@end
